gtk/entrycompletion: Ensure to show first row when shown, not allocated
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 11 Dec 2020 22:13:00 +0000 (23:13 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 12 Dec 2020 00:42:42 +0000 (01:42 +0100)
commit79090f175599f06feae23adb9ae9ac58a8754853
tree7673be6bc765d8183ecff67c204f998e4aeab2cd
parent3d84a388677bd07ea185c0b28598a15a8cede688
gtk/entrycompletion: Ensure to show first row when shown, not allocated

This code was here in gtk3 to cater for the completion window being
positioned. That was only to meant once as long as the completion window
was shown.

This doesn't work as well for gtk4, ::size-allocate gets propagated from
the toplevel, so happens much more often for the completion window, this
ends up with the completion position being reset to the first row
frequently.

Do this simply once when popping up the completion, instead.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3083
gtk/gtkentrycompletion.c